package com.dreamsky.life.util;

import java.util.UUID;

import javax.servlet.http.HttpServletRequest;

public class StringUtils {

	public static String randomId() {
		return UUID.randomUUID().toString().replace("-", "");
	}

	public static String basePath(HttpServletRequest request) {
		String path = request.getContextPath();
		return request.getScheme() + "://" + request.getServerName() + ":"
				+ request.getServerPort() + path + "/";
	}
}
